#ifndef MD5Stream_hxx
#define MD5Stream_hxx
#include "mystring.h"
#include "md5.h"

#include "base.h"

class BASE_API MD5Stream
{
public:      
	MD5Stream();
    ~MD5Stream();
	mystring getHex();
	MD5Stream &operator<<(const char *pstr);
	MD5Stream &operator<<(const mystring &str);
	MD5Stream &operator<<(int i);
private:    
	char			m_Buf[64];
	mystring		m_sContent;
	MD5_CTX			m_Context;
};

bool ComputeMD5(const char *pinput,int len,char *poutput);

#endif
